#include <stdio.h>
#include <stdlib.h>
#include "lqueue.h"

int main(int argc, char *argv[])
{
	lqueue_t *myqueue;
	int i;
	int n;

	// 命令行参数转化为整型数插入到栈中
	if (argc < 2)
		return 1;
	
	lqueue_init(&myqueue, sizeof (int));

	for (i = 1; i < argc; i++) {
		n = atoi(argv[i]);	
		lqueue_enqueue(myqueue, &n);
	}

	while (!lqueue_empty(myqueue)) {
		lqueue_dequeue(myqueue, &n);
		printf("%d ", n);
	}
	printf("\n");

	lqueue_destroy(&myqueue);

	return 0;
}



